<template>
  <page-body>
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center skill_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub skill_fd0_0'>
          <view class='flex flex-wrap align-center skill_fd0_0_c0' >
            <text class='fu-iconfont2  skill_fd0_0_c0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>

            <!-- <text class='skill_fd0_0_c1_c0' v-if="keyword">搜索结果</text> -->
            <text class='skill_fd0_0_c1_c0'>军事技能</text>
          </view>
          <view class='flex flex-wrap align-center justify-end skill_fd0_0_c0'>
           <!-- <text class='fu-iconfont2  skill_fd0_0_c2_c0' @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pageguofang/honoDeta/search/search`">&#xe722;</text>-->
          </view> 
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-wrap align-center justify-between benben-flex-layout skill_flex_1">
        <template v-for='(item,key0) in list'>
          <view class='flex flex-direction flex-wrap align-stretch skill_fd1_0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pageguofang/honoDeta/military/military?course_id=${item.aid}`" :key='key0'>
            <image class='skill_fd1_0_c0' mode="aspectFill" :src='item.fmt'></image>
            <view class='flex flex-direction flex-wrap align-stretch skill_fd1_0_c1' @tap.stop="handleJumpDiy"
              data-type="navigateTo" :data-url="`/pageguofang/honoDeta/military/military?course_id=${item.aid}`">
              <text class='skill_fd1_0_c1_c0'>{{item.kcmc}}</text>
              <view class='flex flex-wrap align-center skill_fd1_0_c1_c1'>
                <text>共</text>
                <text>{{item.chapter_num}}</text>
                <text>章节</text>
              </view>
            </view>
          </view>
        </template>

      </view>
      <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
        :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
      <!---flex布局flex布局结束-->


    </view>
  </page-body>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  import pagingList from '@/common/mixin/paging_list.js';
  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "list": [],
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        keyword: ""
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {
      let {
        keyword
      } = options
      if (keyword != undefined) this.keyword = keyword

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      uni.setStorageSync("are",5)
      if (this.keyword) {
        this.getjo47eac5a55c0bFunc(this.keyword)
      } else {
        this.getjo47eac5a55c0bFunc()
      }
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {
    if (this.keyword) {
      this.getjo47eac5a55c0bFunc(this.keyword)
    } else {
      this.getjo47eac5a55c0bFunc()
    }
    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //查询课程列表
      async getjo47eac5a55c0bFunc(keyword) {
        //请求方法
        //数据验证
        let datalist

        this.minixPagingListsApi = global.apiUrls.post66e3a9f2162ee;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        if (keyword) {
          this.pagingListPostDataContent = {
            keyword
          }
        } else {
          this.pagingListPostDataContent = {
            keyword: ""
          }
        }

        // if (datalist.data.code != 1) {
        //   this.$message.info(datalist.data.msg);
        //   return
        // }
        this.listData = [];
        // let infolist = datalist.data;
        this.list = this.listData;
        this.pagingListToggle();
        console.log("infolist=>", this.list)

        // this.list = infolist.data.data

      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .skill_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .skill_fd0_0_c2_c0 {
    font-size: 32rpx;
  }

  .skill_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .skill_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .skill_fd0_0_c0 {
    width: 120rpx;
  }

  .skill_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .skill_flex_1 {
    padding: 24rpx;
  }

  .skill_fd1_0_c1_c1 {
    font-size: 24rpx;
    line-height: 33rpx;
    font-weight: 400;
    color: rgba(153, 153, 153, 1);
  }

  .skill_fd1_0_c1_c0 {
    font-size: 28rpx;
    font-weight: 500;
    line-height: 40rpx;
    margin: 0rpx 0rpx 16rpx 0rpx;
    width: 100%;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .skill_fd1_0_c1 {
    padding: 16rpx 16rpx 07rpx 16rpx;
  }

  .skill_fd1_0_c0 {
    width: 342rpx;
    height: 220rpx;
    border-radius: 16rpx 16rpx 0rpx 0rpx;
    margin: 0rpx 0rpx 0rpx 0rpx;
  }

  .skill_fd1_0 {
    background: #fff;
    width: 342rpx;
    height: 342rpx;
    border-radius: 16rpx;
    background-size: 100% auto;
    margin: 0rpx 0rpx 16rpx 0rpx;
    position: relative;
  }
</style>
